//
//  BaseTabBarView.swift
//  MusicApp
//
//  Created by tianjs on 2023/4/18.
//

import SwiftUI

struct BaseTabBarView: View {
    
    @State private var selection: Tab = .Events
    
    enum Tab {
        case Events
        case Artist
        case Venue
    }
    
    var body: some View {
        ZStack {
            TabView(selection: $selection) {
                CategoryEvents()
                    .tag(Tab.Events)
                    .tabItem {
                        Label("Events", systemImage: "text.bubble.fill")
                    }
                
                CategoryArtist()
                    .tag(Tab.Artist)
                    .tabItem {
                        Label("Events/Team", systemImage: "guitars.fill")
                    }
                
                CategoryVenue()
                    .tag(Tab.Venue)
                    .tabItem {
                        Label("Venu", systemImage: "location.fill")
                    }
            }
            .background(rgb(r: 255, g: 255, b: 255))
        }
    }
}

struct BaseTabBarView_Previews: PreviewProvider {
    static var previews: some View {
        BaseTabBarView()
    }
}
